﻿using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class RoleDefinitionViewModel : ClientObjectViewModel {
		public RoleDefinitionViewModel(ClientContext context, string name, RoleDefinition roleDefinition) : base(context, name, roleDefinition) {
		}
		public RoleDefinition RoleDefinition { get { return (RoleDefinition)ClientObject; } }
		public override string GetTreeItemTitle() {
			if (Name == string.Empty) {
				return RoleDefinition.Name;
			} else {
				return Name;
			}
		}
		public override string GetContentTitle() {
			return RoleDefinition.Name;
		}
	}
}
